AspNTUser 1.06

Programmer's Manual

Copyright ã 1997 - 1998 Persits Software, Inc.

All rights reserved.

INTRODUCTION

AspNTUser.dll is an active server component for managing Windows NT domain and local users and groups in the Microsoft IIS/Active Server Pages environment. The component is designed as a hierarchy of OLE Automation (ActiveX Server) objects and collections to provide an ASP or VB developer with a simple and intuitive programming interface.

Please read the Disclaimer before installing and using the component.


INSTALLATION

Copy AspNTUser.dll to any directory on your Windows NT server, e.g. c:\mydir. Register the component by executing the command

REGSVR32 c:\mydir\AspNTUser.dll

from the MS DOS or Start/Run prompt.


OBJECT REFERENCE

UserManager Object

This is the top-level object that can be created by

<OBJECT RUNAT=SERVER PROGID="Persits.UserManager.1" ID=UM>

</OBJECT>

or

Set UM = Server.CreateObject("Persits.UserManager.1")

This object provides most of the functionality as well as serves as the "object factory" for Group and User objects and collections.
 

UserManager Properties

 
UserManager Methods

NOTE: The following methods throw exceptions in case of an error. They are also subject to Windows NT security restrictions. If you do not have sufficient rights to execute a method, the Access Denied exception will be thrown.

For Each User in UM.LocalUsers Response.Write User.Name & "<BR>" Next

or

Set UserJoe = UM.LocalUsers("Joe Smith")
Response.Write UserJoe.FullName

or

For i = 1 to UM.LocalUsers.Count

Set User = UM.LocalUsers(i)
Response.Write User.Name & "<BR>"
Next i

Groups Object
Similarly, the Groups object is an OLE Automation collection of Group objects. The usage of the Groups object is exactly the same as that of the Users object.

 
Group Object
The Group object represents a local or domain Windows NT group.
Group Properties
Group Methods

NOTE: The following methods throw exceptions in case of an error. They are also subject to Windows NT security restrictions. If you do not have sufficient rights to execute a method, the Access Denied exception will be thrown.

 
User Properties
User Methods

NOTE: The following methods throw exceptions in case of an error. They are also subject to Windows NT security restrictions. If you do not have sufficient rights to execute a method, the Access Denied exception will be thrown.

EXCEPTION CODES FAQ
Click here for the AspNTUser FAQ.


CODE SAMPLES

The AspNTUser component comes with AspUserManager, an ASP application implementing most of the functions of Windows NT User Manager and User Manger for Domains. The starting ASP file is Login.asp. The AspUserManager files are a great source of code samples for the AspNTUser component.
 
CONTACT INFORMATION
Please contact Persits Software, Inc. at info@persits.com or visit our Web site at http://www.persits.com.


HISTORY OF CHANGES/FIXES

Version 1.06: